

    module.exports = {
        cors: {
            origin: function(ctx) {
                if(ctx.url == '/test') {
                    return '*'
                }
                return 'http://localhost:8080'
            },
            maxAge: 5,
            credentials: true,
            allowMethods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
            allowHeader: ['Content-Type', 'Authorization', 'Accept'],
            exposeHeader: ['WWW-Authenticate', 'Server-Authorization']
        }
    }